<!--
  Generated template for the DataMaintainPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
  <ion-navbar color="primary">
    <ion-title>资料维护</ion-title>
  </ion-navbar>
</ion-header>
<ion-content>
  <ion-list>
    <ion-item>
      <ion-label>用&nbsp;&nbsp;户&nbsp;&nbsp;名</ion-label>
      <ion-input type="text" placeholder="请输入" text-right [(ngModel)]="param.name"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label>手机号码</ion-label>
      <ion-input type="number" placeholder="请输入" text-right [(ngModel)]="param.phone"></ion-input>
    </ion-item>
    <ion-item detail-push>
      <ion-label>日&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期</ion-label>
      <ion-datetime placeholder="请选择" displayFormat="YYYY-MM-DD" pickerFormat="YYYY-MM-DD" doneText="完成" cancelText="取消" [(ngModel)]="param.date"></ion-datetime>
    </ion-item>
    <ion-item detail-push (click)="getDate()">
      <ion-label>日&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期</ion-label>
      <ion-note item-end>{{param?.date2 || '请选择'}}</ion-note>
    </ion-item>
    <button ion-item (click)="pickContract()">选择通讯录</button>
    <ion-item>
      <ion-grid>
        <ion-row>
          <ion-col col-3 *ngFor="let item of files">
            <img src="{{item}}" width="90" height="96" zoom-in-modal>
            <!-- <ion-img src="{{item}}"  zoom-in-modal width="90" height="96"></ion-img> -->
          </ion-col>
          <ion-col col-3 *ngIf="files.length < 4" (click)="selectPic()">
            <img src="assets/img/advance-card-tmntr.jpg" width="90" height="96">
          </ion-col>
          <input type="file" #fileInput style="visibility: hidden; height: 0px" (change)="processWebImage($event)" />
        </ion-row>
      </ion-grid>
      <div style="height: 90px;width:90px" 
      [style.backgroundImage]="getProfileImageStyle()" *ngIf="files[0]"
      ></div>
    </ion-item>
  </ion-list>
  <div padding>
    <button ion-button block (click)="saveContract()">提交</button>
  </div>
</ion-content>
